package com.foxit.pdf2html5.common.intergration;

import java.io.InputStream;

/**
 * @author shaojie_zhuo
 * @version 1.0
 * Document management interface.
 * Web Reader use this interface to get document and get data of document.
 */
public interface IDocStore {
	
	/**
	 * Get document object which specified by the document id.
	 * @param docID document id
	 * @return document object specified by the document id.
	 */
	BaseDocument GetDocumentById(String docID);
	
	/** 
	 * Get document object which specified by the context.
	 * @param context context with parameters to get document.
	 * @return document object specified by the context.
	 */
	BaseDocument GetDocument(Object context);
	
	/**
	 * Get data of document.
	 * @param baseDoc document object
	 * @return byte[] data of document.
	 */
	byte[] ReadAllBytes(BaseDocument baseDoc);
	
	/**
	 * Get an InputStream to read data of document.
	 * @param baseDoc document object
	 * @return an InputStream to read data of document.
	 */
	InputStream GetDocStream(BaseDocument baseDoc);
}
